
#!/bin/sh
docker stop wt-dly-admin-p
PIDST=$!
wait $PIDST

docker rm wt-dly-admin-p
PIDA=$!
wait $PIDA

docker rmi wt-dly-admin:0.0.1 
PIDS=$!
wait $PIDS

docker build -t wt-dly-admin:0.0.1 -f Dockerfile .

PID=$!

wait $PID

STATUS=$?

echo "命令的退出状态: $STATUS"
if [ $STATUS -eq 0 ]; then 
    echo "命令执行成功"

    docker run --name wt-dly-admin-p -p 8848:80 -it --rm -d wt-dly-admin:0.0.1 

    # 获取容器的退出状态
else
    echo "命令执行失败"

fi
# --memory="1g" --memory-swap="1g" 